﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Ajax辅助方法</title>
    <script src="~/Scripts/jquery-3.7.1.min.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
</head>
<body>
    <div>
        <h1>时间：@ViewBag.datetime</h1>
        <div id="loading" style="display:none;"><img style="height:120px;" src="~/Content/加载中/竖条加载动效loading.gif" /></div>
        <p>
            @Ajax.ActionLink("显示客户列表", "CList", new AjaxOptions { 
               HttpMethod = "post", 
               LoadingElementId = "loading",
               UpdateTargetId= "clist",
               InsertionMode=InsertionMode.Replace 
            })
            @*@using(Ajax.BeginForm("CList", "Ajax",new AjaxOptions {
                HttpMethod = "post",
                LoadingElementId = "loading",
                UpdateTargetId = "clist",
                InsertionMode = InsertionMode.Replace
            }))
            {
                <div id="loading" style="display:none;"><img style="height:120px;" src="~/Content/加载中/竖条加载动效loading.gif" /></div>
                <div id="clist"></div>
                <input type="submit" value="显示客户列表">
            }*@
        </p>
        <div id="clist"></div>
    </div>
</body>
</html>
